/*
** Mortem's HGE Addon 1.4
** Copyright (C) 2006-2007, Osokin 'elmortem' Makar
** http://elmortem.mirgames.ru
**
** Utils module.
*/

#ifndef _MHAUTILS_H_
#define _MHAUTILS_H_

#include <hge.h>

float angleNormal(float a);
float floatApproach(float val, float f1, float f2);
float angleApproach(float val, float a1, float a2);
float tr(float angle);
int clr(float r, float g, float b, float a = 1.f);
bool inrect(float x, float y, float rx, float ry, float rw, float rh);
int round(float val);
int str2color(const char *str);
int wcs2color(const wchar_t *str);
bool str2bool(const char *str);
void strfrmt(char *str);
void wcsfrmt(wchar_t *str);

#ifdef UNICODE
#define s2color wcs2color
#else
#define s2color str2color
#endif

#endif
